import Vue from 'vue'
import App from './App.vue'
import router from './router'

function DATE_YYMMDD (isYesterday) {
  // var _this = this;
  var yy = new Date().getFullYear()
  var mm = new Date().getMonth() + 1
  var dd = new Date().getDate()

  if (isYesterday) {
    dd -= 1
  }
  if (mm < 10) mm = '0' + mm;
  if (dd < 10) dd = '0' + dd;

  return yy + '-' + mm + '-' + dd //+ ' ' + hh + ':' + mf + ':' + ss
}

function Month_YYMM () {
  // var _this = this;
  var yy = new Date().getFullYear()
  var mm = new Date().getMonth() + 1
  if (mm < 10) mm = '0' + mm;
  return yy + '-' + mm
}

export default {
  DATE_YYMMDD,
  Month_YYMM
}
